#include "StdAfx.h"
#include "dabstractentity.h"
#include "dvisitor.h"

DAbstractEntity::DAbstractEntity(QObject *parent)
	: QObject(parent)
	, m_access(ePublic)
{
	m_guid = QUuid::createUuid();
}

DAbstractEntity::~DAbstractEntity()
{

}

const QString DAbstractEntity::name() const
{
	return m_strName;
}

void DAbstractEntity::setName(const QString& strName)
{
	m_strName = strName;
}

Access DAbstractEntity::access() const
{
	return m_access;
}

void DAbstractEntity::setAccess(Access access)
{
	m_access = access;
}

EntityType DAbstractEntity::entityType() const
{
	return m_eEntityType;
}

void DAbstractEntity::accept(DVisitor& visitor)
{
	visitor.visit(this);
}

const QUuid& DAbstractEntity::guid()
{
	return m_guid;
}